import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.*;

public class Winner extends JFrame {

	private static final long serialVersionUID = 7293470339507486637L;

	public Winner(String s) {
		super("Result");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		JButton button1 = new JButton("Click here to exit");
		button1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				System.exit(0);
			}
		});
		JToolBar bar = new JToolBar(null, JToolBar.VERTICAL);
		JMenu label = new JMenu("Well Done " + s + ", you have won the game!");
		label.setForeground(Color.RED);
		bar.add(label);
		bar.add(button1);
		JPanel pane = new JPanel();
		pane.add("North", bar);
		pane.setBackground(Color.GREEN);
		setContentPane(pane);
	}

	public static void main(String[] arguments, String winner) {
		Winner frame = new Winner(winner);
		frame.setLocation(300, 300);
		frame.pack();
		frame.setVisible(true);
	}
}